﻿@model CodeCamp.Models.Email.EmailCampaignEditModel

        @*<legend>EmailCampaign</legend>*@

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend></legend>

        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.EventId)
        @Html.HiddenFor(model => model.RecipientType)

        <div class="editor-label">
            @Html.LabelFor(model => model.StatusID, "Status")
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.StatusID, Model.StatusSelectList)
            @Html.ValidationMessageFor(model => model.StatusID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RecipientType, "Recipient Type:")
        </div>
        <div class="editor-field">
            @Html.DisplayTextFor(model => model.RecipientType)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EmailView, "Email View")
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.EmailView, new { cols = 40, rows = 1, @readonly = "true" })
            @Html.ValidationMessageFor(model => model.EmailView)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Subject)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Subject, new { cols = 40, rows = 1, @readonly = "true" })
            @Html.ValidationMessageFor(model => model.Subject)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ReplyToAddress, "Reply To Address")
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.ReplyToAddress, new { cols = 40, rows = 1, @readonly = "true" })
            @Html.ValidationMessageFor(model => model.ReplyToAddress)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Description, new { cols = 40, rows = 4, @readonly = "true" })
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Salutation)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Salutation, new { cols = 60, rows = 5, @readonly = "true" })
            @Html.ValidationMessageFor(model => model.Salutation)
        </div>

        @if (Model.Id != 0)
        {
        <div class="editor-label">
            @Html.LabelFor(model => model.CreatedBy, "Created By")
        </div>
        <div class="editor-field">
            @Html.DisplayTextFor(model => model.CreatedBy)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CreatedUTC, "Created UTC")
        </div>
        <div class="editor-field">
            @Html.DisplayTextFor(model => model.CreatedUTC)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UpdatedBy, "Updated By")
        </div>
        <div class="editor-field">
            @Html.DisplayTextFor(model => model.UpdatedBy)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UpdatedUTC, "Updated UTC")
        </div>
        <div class="editor-field">
            @Html.DisplayTextFor(model => model.UpdatedUTC)
        </div>
        }
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
